﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using BCEntity.OA.TeamWork.TeamWorkCategory;

namespace BCData.OA.TeamWork.TeamWorkCategory
{
    /// <summary>
    /// 协同办公分类
    /// </summary>
    public interface ITeamWorkCategoryData
    {
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="teamWorkCategoryId">协同办公分类Id</param>
        Task<bool> Exists(int teamWorkCategoryId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="teamWorkCategoryCode">协同办公分类编码</param>
        Task<bool> Exists(string teamWorkCategoryCode);
        /// <summary>
        /// 增加协同办公分类
        /// </summary>
        /// <param name="entity">协同办公分类信息</param>
        Task<TeamWorkCategoryEntity> Add(TeamWorkCategoryEntity entity);
        /// <summary>
        /// 更新协同办公分类
        /// </summary>
        /// <param name="entity">协同办公分类信息</param>
        Task<TeamWorkCategoryEntity> Update(TeamWorkCategoryEntity entity);
        /// <summary>
        /// 删除协同办公分类
        /// </summary>
        /// <param name="teamWorkCategoryId">协同办公分类Id</param>
        Task<bool> Delete(int teamWorkCategoryId);
        /// <summary>
        /// 获取协同办公分类
        /// </summary>
        /// <param name="teamWorkCategoryId">协同办公分类Id</param>
        Task<TeamWorkCategoryEntity> GetEntity(int teamWorkCategoryId);
        /// <summary>
        /// 获取协同办公分类
        /// </summary>
        /// <param name="teamWorkCategoryId">协同办公分类Id</param>
        Task<TeamWorkCategoryEntity> GetEntity(string teamWorkCategoryCode);
        /// <summary>
        /// 获取协同办公分类列表
        /// </summary>
        Task<IEnumerable<TeamWorkCategoryEntity>> GetList();
        /// <summary>
        /// 获取协同办公分类分页列表
        /// </summary>
        /// <param name="teamWorkCategoryName">协同办公分类名称</param>
        /// <param name="teamWorkCategoryCode">协同办公分类编码</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">协同办公分类每页数据条数</param>
        Task<(IEnumerable<TeamWorkCategoryEntity>, int)> Query(string teamWorkCategoryName, string teamWorkCategoryCode, DateTime? start, DateTime? end, int pageIndex, int pageSize);
    }
}
